import request from '@/utils/request'
import {SysConfigDomain} from '@/type.d/system/config';

// 查询参数配置列表
export function listConfig(query: SysConfigDomain) {
  return request('/system/config/list',{
    method: 'get',
    params: query
  })
}

// 查询参数配置详细
export function getConfig(configId: string) {
  return request('/system/config/' + configId,{
    method: 'get'
  })
}

// 新增参数配置
export function addConfig(data: SysConfigDomain) {
  return request('/system/config',{
    method: 'post',
    data: data
  })
}

// 修改参数配置
export function updateConfig(data: SysConfigDomain) {
  return request('/system/config',{
    method: 'put',
    data: data
  })
}

// 删除参数配置
export function delConfig(configId: string) {
  return request('/system/config/' + configId,{
    method: 'delete'
  })
}
